package com.yenlien.traceyun.usercenter.entity;

import com.yenlien.traceyun.common.utils.Tools;
import com.yenlien.traceyun.webase.entity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @Date 2022/9/16
 * @Author jiaLong
 * @Descript 冷库租户信息  西昌用户信息
 */
@Entity
@Table(name = "t_cold_user")
public class ColdUser extends BaseEntity {

    private String name;

    private String phone;     // 用作登录

    private String password;

    private String compName;

    private String compAddress;

    private String companyId;   // 该租户所属的冷链企业


    private String isManage;    // 1=西昌冷链后台系统管理员, 2=不是西仓冷链管理员  3=水果 4=农资   该字段有值则代表是西仓冷链系统的用户，companyId也就是ColdStorageComp的Id

    private String userType;      // 1=租户账号  2=非租户账号

    private String createTime = Tools.getCurrentTime();

    @Transient
    private String rentCold;

    public ColdUser(String name, String phone, String password, String compName, String companyId, String isManage, String userType) {
        this.name = name;
        this.phone = phone;
        this.password = password;
        this.compName = compName;
        this.companyId = companyId;
        this.isManage = isManage;
        this.userType = userType;
        this.createTime = Tools.getCurrentTime();
    }

    public ColdUser() {
    }

    public String getRentCold() {
        return rentCold;
    }

    public void setRentCold(String rentCold) {
        this.rentCold = rentCold;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public String getIsManage() {
        return isManage;
    }

    public void setIsManage(String isManage) {
        this.isManage = isManage;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCompName() {
        return compName;
    }

    public void setCompName(String compName) {
        this.compName = compName;
    }

    public String getCompAddress() {
        return compAddress;
    }

    public void setCompAddress(String compAddress) {
        this.compAddress = compAddress;
    }
}
